#pragma once
#include <atldbcli.h>
#include <string>
#include <iostream>
#include <vector>
#include <fstream>
#include <map>
#include "..\geometry\polygon.h"


//using namespace std;
using std::vector;
using std::map;
using std::string;

enum mobj_type {river,house, island, green, lake, road,smth,end};

typedef std::pair<int,int> cell_pos;

class CELL_DATA
{
public:
	cell_pos cell_id;
	vector<int> objects;
	vector<int>::iterator idexist(int mobj_id);
	void del_obj_byid(int mobj_id);
};


class MAP_OBJECT
{
public:
	MAP_OBJECT(void);
	MAP_OBJECT(MAP_OBJECT const & datain);
	~MAP_OBJECT(void);
public:
	int  mobj_id;
	char label[40]; 
	mobj_type mtype;
	//vector<MAP_CONTOUR> contours;
	polygon_t polygon;
	short int maxscale;
	short int imp;
	short int modified;
};

typedef std::map<int,MAP_OBJECT> map_obj;
typedef std::pair<int,MAP_OBJECT> map_obj_pair;

typedef std::map<cell_pos,CELL_DATA> cell_obj;
typedef std::pair<cell_pos,CELL_DATA> cell_obj_pair;
